@tailwind base;
@tailwind components;
@tailwind utilities;

/* 重置样式 */
* {
  box-sizing: border-box;
}

:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color: #213547;
  background-color: #f8fafc;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100vh;
  background-color: #f8fafc;
  color: #213547;
}

#app {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Tailwind样式类 */
.min-h-screen { min-height: 100vh; }
.bg-gray-50 { background-color: #f9fafb; }
.text-white { color: #ffffff; }
.text-gray-50 { color: #f9fafb; }
.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-blue-100 { color: #dbeafe; }
.text-blue-600 { color: #2563eb; }
.text-blue-800 { color: #1e40af; }
.text-green-500 { color: #10b981; }
.text-green-600 { color: #059669; }
.text-green-800 { color: #065f46; }
.text-yellow-600 { color: #d97706; }
.text-yellow-800 { color: #92400e; }
.text-purple-600 { color: #9333ea; }
.text-purple-800 { color: #7c3aed; }
.text-red-500 { color: #ef4444; }
.text-red-800 { color: #991b1b; }

.bg-white { background-color: #ffffff; }
.bg-blue-100 { background-color: #dbeafe; }
.bg-green-100 { background-color: #d1fae5; }
.bg-yellow-100 { background-color: #fef3c7; }
.bg-purple-100 { background-color: #e9d5ff; }
.bg-red-100 { background-color: #fecaca; }

.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.font-bold { font-weight: 700; }
.font-medium { font-weight: 500; }

.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }

.transition-colors { transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out; }

/* 渐变背景类 */
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-blue-500 { --tw-gradient-from: #3b82f6; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(59, 130, 246, 0)); }
.to-purple-600 { --tw-gradient-to: #9333ea; }
.from-green-500 { --tw-gradient-from: #10b981; }
.to-blue-600 { --tw-gradient-to: #2563eb; }
.from-orange-500 { --tw-gradient-from: #f97316; }
.to-red-600 { --tw-gradient-to: #dc2626; }
.from-purple-500 { --tw-gradient-from: #a855f7; }
.to-pink-600 { --tw-gradient-to: #db2777; }
.from-indigo-500 { --tw-gradient-from: #6366f1; }

/* 基础样式组件 */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.gradient-bg {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.bg-green-500 { background-color: #10b981; }
.bg-yellow-500 { background-color: #f59e0b; }
.bg-red-500 { background-color: #ef4444; }

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  background-color: #1f2937;
  color: #fff;
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -60px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
  white-space: nowrap;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

.progress-bar {
  height: 6px;
  background-color: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
  transition: width 0.3s ease;
}

.metric-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.metric-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

/* 头部样式 */
.dashboard-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dashboard-header .container {
  max-width: 95vw;
  margin: 0 auto;
  padding: 1rem 0.75rem;
}

.dashboard-header .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dashboard-header .brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-header .brand-icon {
  width: 2.5rem;
  height: 2.5rem;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dashboard-header .brand-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.dashboard-header .brand-text p {
  color: #bfdbfe;
  font-size: 0.875rem;
  margin: 0;
}

.dashboard-header .header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.dashboard-header .last-update {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.dashboard-header .refresh-btn {
  background-color: rgba(255, 255, 255, 0.2);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.3s;
  border: none;
  color: white;
  cursor: pointer;
}

.dashboard-header .refresh-btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

/* 主要内容区域 */
.dashboard-main {
  max-width: 95vw; 
  margin: 0 auto;
  padding: 2rem 0.75rem;
}

/* 统计卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.stat-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stat-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.stat-card-value {
  text-align: right;
}

.stat-card-value .number {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
}

.stat-card-value .label {
  font-size: 0.875rem;
  color: #6b7280;
}

.stat-card-trend {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: #4b5563;
}

/* 过滤器和控件 */
.filter-section {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.filter-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .filter-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
  }
}

.filter-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
}

.search-type-select {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background-color: white;
  color: #374151;
  min-width: 100px;
  cursor: pointer;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-type-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.search-input input {
  padding-left: 2.5rem;
  padding-right: 3.5rem; /* 右侧留出按钮空间 */
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  width: 100%;
  min-width: 200px;
}

.search-input input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-input .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  z-index: 1;
}

.search-btn {
  position: absolute;
  right: 0.25rem;
  top: 50%;
  transform: translateY(-50%);
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.3s;
  z-index: 1;
}

.search-btn:hover:not(:disabled) {
  background-color: #2563eb;
}

.search-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

.filter-select {
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  min-width: 120px;
}

.filter-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-primary {
  background-color: #2563eb;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-secondary:hover {
  background-color: #e5e7eb;
}

/* 数据表格 */
.data-table {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  overflow: hidden;
}

.table-header {
  padding: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.table-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.table-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.table-controls span {
  font-size: 0.875rem;
  color: #6b7280;
}

.table-controls select {
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.table-wrapper {
  overflow-x: auto;
}

.modern-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* 固定表格布局以便更好地控制列宽 */
}

.modern-table thead {
  background-color: #f9fafb;
}

.modern-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e5e7eb;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 指定每列的宽度 */
.modern-table th:nth-child(1) { width: 8%; }   /* Task ID */
.modern-table th:nth-child(2) { width: 15%; }  /* 站点信息 */
.modern-table th:nth-child(3) { width: 6%; }   /* 站点收录数 */
.modern-table th:nth-child(4) { width: 12%; }  /* 锚文本 */
.modern-table th:nth-child(5) { width: 22%; }  /* 外链地址 */
.modern-table th:nth-child(6) { width: 22%; }  /* 客户链接 */
.modern-table th:nth-child(7) { width: 12%; }  /* 外链状态 */
.modern-table th:nth-child(8) { width: 10%; }  /* Google友好度 */
.modern-table th:nth-child(9) { width: 13%; }  /* 操作 */

.modern-table td:nth-child(1) { width: 8%; }   /* Task ID */
.modern-table td:nth-child(2) { width: 15%; }  /* 站点信息 */
.modern-table td:nth-child(3) { width: 6%; }   /* 站点收录数 */
.modern-table td:nth-child(4) { width: 12%; }  /* 锚文本 */
.modern-table td:nth-child(5) { width: 22%; }  /* 外链地址 */
.modern-table td:nth-child(6) { width: 22%; }  /* 客户链接 */
.modern-table td:nth-child(7) { width: 12%; }  /* 外链状态 */
.modern-table td:nth-child(8) { width: 10%; }  /* Google友好度 */
.modern-table td:nth-child(9) { width: 13%; }  /* 操作 */

.modern-table th .sort-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modern-table tbody {
  background-color: white;
}

.modern-table tr {
  transition: background-color 0.3s;
  border-bottom: 1px solid #e5e7eb;
}

.modern-table tr:hover {
  background-color: #f9fafb;
}

.modern-table td {
  padding: 1rem 1.5rem;
  vertical-align: middle;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 0; /* 配合table-layout: fixed使用 */
}

/* 表格单元格样式 */
.task-id-cell {
  display: flex;
  align-items: center;
}

.task-id-icon {
  width: 2rem;
  height: 2rem;
  background-color: #dbeafe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.task-id-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}

.site-info-cell {
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
}

.site-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.75rem;
  color: white;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.site-details {
  min-width: 0; /* 允许收缩 */
  flex: 1;
}

.site-details .site-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-details .site-type {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anchor-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.anchor-tag.blue {
  background-color: #dbeafe;
  color: #1e40af;
}

.anchor-tag.purple {
  background-color: #e9d5ff;
  color: #7c3aed;
}

.anchor-tag.green {
  background-color: #d1fae5;
  color: #065f46;
}

.url-link {
  color: #2563eb;
  font-size: 0.875rem;
  text-overflow: ellipsis;
  overflow: hidden;
  display: block;
  max-width: 100%; /* 改为100%以适应父容器 */
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.url-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.status-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-tag.success {
  background-color: #d1fae5;
  color: #065f46;
}

.status-tag.warning {
  background-color: #fef3c7;
  color: #92400e;
}

.status-tag.error {
  background-color: #fecaca;
  color: #991b1b;
}

.action-btn {
  background-color: #2563eb;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.action-btn:hover {
  background-color: #1d4ed8;
}

.action-btn:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
}

/* 分页样式 */
.pagination {
  background-color: white;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.pagination-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
}

.pagination-info .font-medium {
  font-weight: 500;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #f9fafb;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  color: #6b7280;
}

.pagination-btn.active {
  color: white;
  background-color: #2563eb;
  border-color: #2563eb;
}

.pagination-numbers {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.pagination-number {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  background-color: white;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  cursor: pointer;
  text-decoration: none;
}

.pagination-number:hover {
  background-color: #f9fafb;
}

.pagination-number.active {
  color: white;
  background-color: #2563eb;
  border-color: #2563eb;
}

.pagination-ellipsis {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .dashboard-main {
    max-width: 97vw;
    padding: 1.5rem 0.5rem;
  }
  
  .dashboard-header .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .dashboard-header .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .filter-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .filter-left {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .search-container {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .search-type-select {
    width: 100%;
  }
  
  .search-input input {
    width: 100%;
  }
  
  .search-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .filter-select {
    width: 100%;
  }
  
  .pagination-content {
  flex-direction: column;
    gap: 1rem;
  }
  
  .pagination-controls {
    justify-content: center;
  }
  
  .modern-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }
  
  .url-link {
    max-width: 12rem;
  }

  /* 移动设备上调整列宽 */
  .modern-table th:nth-child(1) { width: 6%; }   /* Task ID */
  .modern-table th:nth-child(2) { width: 18%; }  /* 站点信息 */
  .modern-table th:nth-child(3) { width: 5%; }   /* 站点收录数 */
  .modern-table th:nth-child(4) { width: 10%; }  /* 锚文本 */
  .modern-table th:nth-child(5) { width: 23%; }  /* 外链地址 */
  .modern-table th:nth-child(6) { width: 23%; }  /* 客户链接 */
  .modern-table th:nth-child(7) { width: 8%; }   /* 外链状态 */
  .modern-table th:nth-child(8) { width: 7%; }   /* Google友好度 */
  .modern-table th:nth-child(9) { width: 0%; }   /* 操作 - 移动端隐藏 */

  .modern-table td:nth-child(1) { width: 6%; }   /* Task ID */
  .modern-table td:nth-child(2) { width: 18%; }  /* 站点信息 */
  .modern-table td:nth-child(3) { width: 5%; }   /* 站点收录数 */
  .modern-table td:nth-child(4) { width: 10%; }  /* 锚文本 */
  .modern-table td:nth-child(5) { width: 23%; }  /* 外链地址 */
  .modern-table td:nth-child(6) { width: 23%; }  /* 客户链接 */
  .modern-table td:nth-child(7) { width: 8%; }   /* 外链状态 */
  .modern-table td:nth-child(8) { width: 7%; }   /* Google友好度 */
  .modern-table td:nth-child(9) { width: 0%; }   /* 操作 - 移动端隐藏 */
  
  /* 移动端隐藏操作列 */
  .modern-table th:nth-child(9),
  .modern-table td:nth-child(9) {
    display: none;
  }
}

@media (max-width: 480px) {
  .dashboard-main {
    padding: 1rem 0.5rem;
    max-width: 98vw;
  }
  
  .filter-section {
    padding: 1rem;
  }
  
  .table-header {
    padding: 1rem;
  }
  
  .modern-table th,
  .modern-table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }
  
  .url-link {
    max-width: 8rem;
  }

  /* 超小屏幕设备进一步调整列宽 */
  .modern-table th:nth-child(1) { width: 4%; }   /* Task ID */
  .modern-table th:nth-child(2) { width: 20%; }  /* 站点信息 */
  .modern-table th:nth-child(3) { width: 4%; }   /* 站点收录数 */
  .modern-table th:nth-child(4) { width: 8%; }   /* 锚文本 */
  .modern-table th:nth-child(5) { width: 30%; }  /* 外链地址 */
  .modern-table th:nth-child(6) { width: 30%; }  /* 客户链接 */
  .modern-table th:nth-child(7) { width: 4%; }   /* 外链状态 */
  .modern-table th:nth-child(8) { width: 0%; }   /* Google友好度 - 超小屏隐藏 */
  .modern-table th:nth-child(9) { width: 0%; }   /* 操作 - 超小屏隐藏 */

  .modern-table td:nth-child(1) { width: 4%; }   /* Task ID */
  .modern-table td:nth-child(2) { width: 20%; }  /* 站点信息 */
  .modern-table td:nth-child(3) { width: 4%; }   /* 站点收录数 */
  .modern-table td:nth-child(4) { width: 8%; }   /* 锚文本 */
  .modern-table td:nth-child(5) { width: 30%; }  /* 外链地址 */
  .modern-table td:nth-child(6) { width: 30%; }  /* 客户链接 */
  .modern-table td:nth-child(7) { width: 4%; }   /* 外链状态 */
  .modern-table td:nth-child(8) { width: 0%; }   /* Google友好度 - 超小屏隐藏 */
  .modern-table td:nth-child(9) { width: 0%; }   /* 操作 - 超小屏隐藏 */
  
  /* 超小屏幕隐藏Google友好度和操作列 */
  .modern-table th:nth-child(8),
  .modern-table td:nth-child(8),
  .modern-table th:nth-child(9),
  .modern-table td:nth-child(9) {
    display: none;
  }
}

/* Element Plus 组件样式覆盖 */
.el-button--primary {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
}

.el-button--primary:hover {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

.el-button--primary:disabled {
  background-color: #93c5fd !important;
  border-color: #93c5fd !important;
}

.el-tag {
  border: none !important;
}

.el-tag--success {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
}

.el-tag--warning {
  background-color: #fef3c7 !important;
  color: #92400e !important;
}

.el-tag--danger {
  background-color: #fecaca !important;
  color: #991b1b !important;
}

.el-popover {
  border-radius: 0.5rem !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* 动画和过渡效果 */
.list-enter-active,
.list-leave-active {
  transition: all 0.3s ease;
}

.list-enter-from {
  opacity: 0;
  transform: translateY(10px);
}

.list-leave-to {
  opacity: 0;
  transform: translateY(-10px);
}

/* 加载状态 */
.loading-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
